﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ProtoBuf;

namespace ZyGames.DZPocker.Model
{
	/// <summary>
	/// 用于下发简单的玩家信息Model（例如：下发游客信息）
	/// </summary>
	[Serializable, ProtoContract]
	public class SimpleUserData
	{
		[ProtoMember(1)]
		public int UserId { get; set; }

		[ProtoMember(2)]
		public string NickName { get; set; }

		/// <summary>
		/// 玩家头像
		/// </summary>
		[ProtoMember(3)]
		public string HeadIcon { get; set; }
	}

	/// <summary>
	/// 带有头像的简单玩家
	/// </summary>
	[Serializable, ProtoContract]
	public class SimpleUserDataWithTexture
	{
		[ProtoMember(1)]
		public int UserId { get; set; }

		[ProtoMember(2)]
		public string NickName { get; set; }

		/// <summary>
		/// 玩家头像字节流
		/// </summary>
		[ProtoMember(3)]
		public string HeadIcon { get; set; }
	}

	[Serializable, ProtoContract]
	public class SimpleUserDataWithDetailInfo
	{
		[ProtoMember(1)]
		public int UserId { get; set; }

		[ProtoMember(2)]
		public string NickName { get; set; }

		/// <summary>
		/// 玩家头像字节流
		/// </summary>
		[ProtoMember(3)]
		public string HeadIcon { get; set; }

		/// <summary>
		/// 玩家性别
		/// </summary>
		[ProtoMember(4)]
		public bool Sex { get; set; }

		/// <summary>
		/// 个性签名
		/// </summary>
		[ProtoMember(5)]
		public string Sign { get; set; }
	}

	/// <summary>
	/// 带参与牌桌的基本玩家信息
	/// </summary>
	[Serializable, ProtoContract]
	public class SimpleUserDataWithTableIds
	{
		[ProtoMember(1)]
		public SimpleUserData UserData { get; set; }

		/// <summary>
		/// 当前所参与的牌桌
		/// </summary>
		[ProtoMember(2)]
		public List<int> TableIds { get; set; }
	}

	/// <summary>
	/// 我的战绩里面牌桌里每一个参与的人的成绩记录(MyBattleRecordTablePanel的ListItem的Model)
	/// </summary>
	[Serializable, ProtoContract]
	public class SimpleUserDataTableScoreRecord
	{
		[ProtoMember(1)]
		public SimpleUserData UserData { get; set; }

		[ProtoMember(2)]
		public int Profit { get; set; }

		/// <summary>
		/// 是否是保险人
		/// </summary>
		[ProtoMember(3)]
		public bool IsInsurance { get; set; }

		/// <summary>
		/// 总买入
		/// </summary>
		[ProtoMember(4)]
		public int TotalBuy { get; set; }
	}

	/// <summary>
	/// 战局回顾MyBattleRecordPanel中的牌桌ListItem
	/// </summary>
	[Serializable, ProtoContract]
	public class TableScoreRecord
	{
		/// <summary>
		/// 桌子ID(记录桌子的ID而非一般的桌子ID)
		/// </summary>
		[ProtoMember(1)]
		public int ID { get; set; }

		[ProtoMember(2)]
		public string TableName { get; set; }

		[ProtoMember(3)]
		public DateTime BeginTime { get; set; }

		/// <summary>
		/// 盈亏(玩家在当前一手牌局中的盈亏)
		/// </summary>
		[ProtoMember(4)]
		public int Profile { get; set; }

		/// <summary>
		/// 参与角色(包括盈亏)
		/// </summary>
		[ProtoMember(5)]
		public List<SimpleUserDataTableScoreRecord> UsersTableRecord { get; set; }

		/// <summary>
		/// 房主的ID
		/// </summary>
		[ProtoMember(6)]
		public int MasterUserId { get; set; }

		/// <summary>
		/// 桌子时间
		/// </summary>
		[ProtoMember(7)]
		public int TableTime { get; set; }

		/// <summary>
		/// 保险人的Id
		/// </summary>
		[ProtoMember(8)]
		public int InsurancerUserId { get; set; }

		/// <summary>
		/// 小盲
		/// </summary>
		[ProtoMember(9)]
		public int SmallBindValue { get; set; }


		[ProtoMember(10)]
		public int BigBindValue { get; set; }

		/// <summary>
		/// 总手数
		/// </summary>
		[ProtoMember(11)]
		public int TotalHand { get; set; }

		/// <summary>
		/// 总带入
		/// </summary>
		[ProtoMember(12)]
		public int TotalBuy { get; set; }

	}

	/// <summary>
	/// 玩家所在的牌局
	/// </summary>
	[Serializable, ProtoContract]
	public class UserPlayingTable
	{
		/// <summary>
		/// 桌子ID(记录桌子的ID而非一般的桌子ID)
		/// </summary>
		[ProtoMember(1)]
		public int TableID { get; set; }

		[ProtoMember(2)]
		public string TableName { get; set; }

		[ProtoMember(3)]
		public string UserHeadIcon { get; set; }

		[ProtoMember(4)]
		public string UserNickName { get; set; }

		[ProtoMember(5)]
		public int LeftTime { get; set; }

		[ProtoMember(6)]
		public int UserId { get; set; }

		/// <summary>
		/// 个性签名
		/// </summary>
		[ProtoMember(7)]
		public string Sign { get; set; }

		[ProtoMember(8)]
		public bool Sex { get; set; }
	}
}
